<template>
	<view>
		<view class="input_box">
			
					<input type="text" placeholder="请输入内容 如:保洁" />
					<text style="color: white; font-size: 15px; font-weight: 400; margin-left: 10px;"  @click="back()">取消</text>
		</view>
		<view class="content">
			<text>热门搜索:</text>
			<view>
				<text class="btn">保洁</text>
				<text class="btn">治疗</text>
			</view>
		</view>
		<view class="content" style="margin-top: 30px;">
			<text>历史搜索:</text>
			<image src="../../../static/delete.png" style="width: 15px; height: 15px;margin-left:69%;"
			@click="delhis()"></image>
			<view>
				<text class="btn" v-for="(item,index) in his" >{{item}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			his:[
			"理发",
			"洗澡",
			"腹泻怎么办"
			]
			}
		},
		methods: {
		delhis(){
			this.his=[]
		},
		back(){
			uni.navigateBack({
				delta: 1
			})
		}
		}
	}
</script>

<style>
	* {
		font-size: 10px;
	}

	,

	.input_box {
		height: 30px;
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		padding-top: 10px;
		background-color: #007AFF;
		padding-bottom: 15px;
	}

	,

	input {
		width: 70%;
		height: 20px;
		background: url(../../../static/search.png) no-repeat;
		background-position: 3px;
		background-size: 20px 20px;
		padding: 5px 0px 5px 30px;
		border-radius: 5px;
		background-color: white;
		outline: none;

	}

	,
	.content {
		margin-top: 10px;
	}

	,
	.content view {
		margin-top: 10px;
	}

	,
	.content>text {
		margin: 15px 0px 5px 10px;
		font-size: 15px;
	}

	,
	.btn {
		background-color: #dbdbdb;
		padding: 5px 20px;
		border-radius: 5px;
		margin: 5px;
		margin-left: 10px;
	}
</style>
